bb35b2626c1710ab56bce1dcf7453ce815413ffc,java/java-psi-impl/src/com/intellij/psi/impl/source/ClassInnerStuffCache.java,ClassInnerStuffCache,getMethods,#,94

Before Change



  @NotNull
  public PsiMethod[] getMethods() {
    CachedValue<PsiMethod[]> cache = myMethodsCache;
    if (cache == null) {
      final CachedValuesManager manager = CachedValuesManager.getManager(myClass.getProject());
      final Object[] dependencies = {PsiModificationTracker.OUT_OF_CODE_BLOCK_MODIFICATION_COUNT, myTreeChangeTracker};

      myMethodsCache = cache = manager.createCachedValue(new CachedValueProvider<PsiMethod[]>() {
        @Override
        public Result<PsiMethod[]> compute() {
          return Result.create(getAllMethods(), dependencies);
        }
      }, false);
    }
    final PsiMethod[] methods = cache.getValue();
    return methods != null ? methods : PsiMethod.EMPTY_ARRAY;
  }

  @NotNull

After Change



  @NotNull
  public PsiMethod[] getMethods() {
    return CachedValuesManager.getCachedValue(myClass, new CachedValueProvider<PsiMethod[]>() {
      @Nullable
      @Override
      public Result<PsiMethod[]> compute() {
        return Result.create(getAllMethods(), OUT_OF_CODE_BLOCK_MODIFICATION_COUNT, myTracker);
      }
    });
  }

  @NotNull